<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>
        电梯巡查详情
    </title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="../../css/main.css" media="all">
    <script type="text/javascript" src="../../lib/loading/okLoading.js"></script>
    <link rel="stylesheet" href="../../css/bootstrap.css">
    <link rel="stylesheet" href="../../lib/layui/css/layui_2.5.7.css">
    <link href="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
    <style>
        .layui-table-page select {
            height: 22px;
        }
    </style>
</head>

<body>
<div>
    <div class="x-nav">
        <span class="layui-breadcrumb">
            <a><cite>首页</cite></a>
            <a><cite>项目信息</cite></a>
            <a><cite>电梯巡查详情</cite></a>
        </span>
        <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right"
           href="javascript:location.replace(location.href);" title="刷新"><i class="layui-icon"
                                                                            style="line-height:30px">ဂ</i></a>
    </div>
    <div id="app" class="modal-body">
        <div class="row">
            <div class="col-xs-6">
                <ul style="line-height:28px;padding-left: 15px;" class="orderInfo">
                    <li><h4><b>电梯信息</b></h4>
                        <ul>
                            <!--<li>维保公司：{{information.company.name}}</li>-->
                            <li>使用单位：{{information.company.name}}</li>
                            <li>项目名称：{{information.project.name}}</li>
                            <li>电梯位置：{{information.elevator.address}}</li>
                        </ul>
                    </li>
                    <li><h4><b>巡查签到</b></h4>
                        <ul>
                            <li>签到人员：{{information.inspectionperson}}</li>
                            <li>有无问题：
                                <span v-if="information.isproblem == '0'"
                                      class="label" style="background-color: #808080">无</span>
                                <span v-if="information.isproblem == '1'"
                                      class="label label-warning">有</span>
                            </li>
                            <li>备注信息：{{information.remark}}</li>
                            <li>签到时间：{{information.inspectiontime}}</li>
                        </ul>
                    </li>
                </ul>
            </div>
            <div class="col-xs-6">
                <div v-if="images ==''"><p style="text-align: center">暂无照片</p></div>
                <div v-else>
                    <span v-for="(item,index) in images">
                        <a target="_blank"
                           :href="item"><img
                                style="width: 115px"
                                :src="item"></a>
                    </span>
                </div>
            </div>
        </div>
    </div>
</div>
</body>

<script type="text/javascript" src="../../js/jquery.min.js"></script>
<script type="text/javascript" src="../../js/myAjax.js"></script>
<script type="text/javascript" src="../../js/pub.js"></script>
<script type="text/javascript" src="../../lib/layui/layui2.5.7.js"></script>
<script type="text/javascript" src="../../js/vue.min.js"></script>
<!-- <script src="lib/layui/layui.js" charset="utf-8"></script> -->
<script src="../../js/x-layui.js" charset="utf-8"></script>
<script src="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/3.3.5/js/bootstrap.min.js"></script>

<script>
    //配置插件目录
    layui.config({
        base: '../../js/'
        , version: '1.0'
    });
</script>
<script>
    layui.use(['laydate', 'element', 'laypage', 'layer', 'form'], function () {
        $ = layui.jquery;//jquery
        laydate = layui.laydate;//日期插件
        lement = layui.element;//面包导航
        laypage = layui.laypage;//分页
        layer = layui.layer;//弹出层
        var form = layui.form;
        okLoading.close($);
    });
</script>

<script>

    let recordId = getQueryVariable("recordId");

    new Vue({
        el: "#app",
        data: {
            information: {},
            images: [],
            path: 'other/viewUploadFile?id='

        },
        created() {
            let request = {
                url: '/maintenance/inspection/detail',
                data: {
                    userId: $userId,
                    id: recordId,
                },
                method: "POST",
            };
            sendRequest(request, (res) => {
                this.information = res.data;
                this.images = res.data.image.split(',');
                if (this.images != '') {
                    for (let i = 0; i < this.images.length; i++) {
                        if (this.images[i] != '') {
                            this.images[i] = $baseUrl + this.path + this.images[i];
                        }
                    }
                }
            });
        }
    });

</script>


</html>
